]> AND Private Git Repository - these_gilles.git/blob - DOCS/Scalable and Interactive Segmentation and Visualization of Neural Processes in EM Datasets_files/hfjs.js
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
modif finale lnivs + keywords
[these_gilles.git] / DOCS / Scalable and Interactive Segmentation and Visualization of Neural Processes in EM Datasets_files / hfjs.js
1 var signin = document.getElementById("sign_in");
2 if(typeof signin != 'undefined'  && signin){
3     signin.href = signin.href + "?back_url=" + encodeURIComponent(window.location);
4 }
5
6 var signout = document.getElementById('sign_out');
7 if(typeof signout != 'undefined' && signout){
8     signout.href = signout.href + "?back_url=" + encodeURIComponent(window.location);
9 }
10
11 function getCookie(cookie_name) {
12     var start_pos = document.cookie.indexOf(cookie_name + "="); //start cookie name
13     if (start_pos != -1) {
14         start_pos = start_pos + cookie_name.length+1; //start cookie value                
15         var end_pos = document.cookie.indexOf(";", start_pos);
16         if (end_pos == -1) {
17             end_pos = document.cookie.length;
18         }
19         return decodeURIComponent(document.cookie.substring(start_pos, end_pos)); 
20     }
21     else {
22         return "";
23     }
24 }        
25
26 var c = getCookie('WebCubbyUser');
27 c = decodeURIComponent(decodeURIComponent(c));
28 lre = /.*logged-in\=(\w*);.*/; 
29 ure = /.*my-name\=([\w|\-|\.|\ |\@|\+]*);.*/;
30 plus = /\+/gi;
31
32 if(c){ 
33     l = lre.exec( c );
34     if(l && l[1] && l[1] === 'true' ) {
35         u = ure.exec( c );
36         if(u && u[1]){ 
37             var myncbi_username = document.getElementById("myncbiusername");
38             var uname = document.getElementById('mnu');
39             if (uname) {
40                 if (typeof uname != 'undefined') {
41                     uname.appendChild(document.createTextNode(u[1].replace(plus, ' ')));
42                     myncbi_username.style.display = "inline";
43                 
44                     var signin = document.getElementById("sign_in");
45                     signin.style.display = "none";                                          
46                 
47                     var signout = document.getElementById("sign_out");
48                     signout.style.display = "inline";
49                     
50                     var myncbi = document.getElementById('myncbi');
51                     myncbi.style.display='inline';                                                      
52                 }
53             }
54         }
55     }
56 }
57
58 (function( $ ){ 
59     $( function() {
60         if (typeof $.fn.ncbipopper == "function") {
61             $('#info .external').each( function(){
62                 var $this = $( this );
63                 var popper = $this;
64                 popper.ncbipopper({
65                     destSelector: '#external-disclaimer',
66                     isDestElementCloseClick: false,
67                     openAnimation: 'none', 
68                     closeAnimation: 'none', 
69                     isTriggerElementCloseClick: false,
70                     triggerPosition: 'bottom center', 
71                     destPosition: 'top center', 
72                     hasArrow: true, 
73                     arrowDirection: 'top'
74                 });
75             }); 
76         }
77     });
78 })( jQuery );
79
80 if(typeof jQuery !== 'undefined' && jQuery.ui){
81     var version = jQuery.ui.jig.version;
82     var pieces = version.split(".");
83     if(pieces[0] >= 1 && pieces[1] >= 11){
84         if(pieces[1] == 11 && pieces[2] && pieces[3] >= 2){
85             jQuery("#sign_in").click(function(e){        
86                 if(typeof jQuery.ui.jig.requiresLogin !== 'undefined'){
87                     e.preventDefault();
88                     jQuery.ui.jig.requiresLogin();
89                 }
90             });
91         }
92     }
93 }